package contreller

import (
	"SkillTextJD2/Util"
	"SkillTextJD2/model"
	"fmt"
	"github.com/gin-gonic/gin"
)

func HandlerBut(c *gin.Context) {
	Name := c.Query("Name")
	fmt.Println("Name=", Name)
	var But = model.But{
		City:   c.PostForm("txt_cCity"),
		Time:   c.PostForm("txt_cTime"),
		Price:  c.PostForm("txt_cPrice"),
		Tax:    c.PostForm("txt_cTax"),
		Meals:  c.PostForm("txt_cMeals"),
		Flight: c.PostForm("txt_cFlight"),
		Button: c.PostForm("txt_cButton"),
	}
	Util.DB().Table("attractions").Where("attractions_Name = ?", "%"+But.City+"%").Update(But)
	//util.ConnDB().Table("companys").Where("company_id=?", id).Update(company)

	Handlerpayment(c)
}
